﻿using System.Collections.Generic;
using System.IO;
using Spriter.Logic.Infrastructure;
using Spriter.Ui.ViewModels.UserControls;

namespace Spriter.Ui.ViewModels
{
    public class HomeViewModel : BaseViewModel
    {
        #region OutputFilename

        private string _outputFilename;

        public string OutputFilename
        {
            get { return _outputFilename; }
            set
            {
                _outputFilename = value;
                OnPropertyChanged("OutputFilename");
            }
        }

        #endregion

        #region OutputFolder

        public FolderPickerViewModel FolderViewModel { get; set; }

        #endregion

        #region OutputFileType

        private Constants.ImageType _outFileType;
        private string _filePath;

        public Constants.ImageType OutFileType
        {
            get { return _outFileType; }
            set
            {
                _outFileType = value;
                OnPropertyChanged("OutFileType");
            }
        }

        #endregion

        #region Files

        public FilesPickerViewModel FilesViewModel { get; set; }

        #endregion

        #region Filepath

        public string FilePath
        {
            get { return _filePath; }
            set { _filePath = value; OnPropertyChanged("FilePath"); }
        }

        #endregion

        public HomeViewModel(IEnumerable<Constants.ImageType> validFileTypes)
        {
            FilesViewModel = new FilesPickerViewModel();
            OutputFileTypes = validFileTypes;
        }

        public IEnumerable<Constants.ImageType> OutputFileTypes { get; private set; }
    }
}